<template>
  <base-modal
    :title="pageType === 'edit' ? '月安全交底计划项编辑': '月安全交底计划项添加'"
    cancelText="取消"
    okText="保存"
    :width="800"
    v-on="$listeners"
    @ok="handleOk"
  >
    <a-form :form="formInfo">
      <a-row :gutter="24">
        <a-col :md="12" :sm="12">
          <a-form-item
            label="序号"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <BaseInput placeholder="请输入" v-decorator="['index']" />
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="12">
          <a-form-item
            label="交底编号"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select
              show-search
              placeholder="请选择"
              :labelInValue="true"
              v-decorator="['closureNumber']"
            >
              <!-- <a-select-option
                    v-for="(item, index) in company"
                    :value="item.orgId"
                    :key="index"
              >{{item.orgName}}</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item
            label="安全技术交底名称"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <BaseInput placeholder="请输入" v-decorator="['closureName']" />
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item
            label="交底人"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-select show-search placeholder="请选择" :labelInValue="true" v-decorator="['closurePerson']">
              <!-- <a-select-option
                    v-for="(item, index) in company"
                    :value="item.orgId"
                    :key="index"
              >{{item.orgName}}</a-select-option>-->
            </a-select>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item
            label="交底日期"
            :labelCol="{ lg: { span: 6 }, sm: { span: 6 } }"
            :wrapperCol="{ lg: { span: 18 }, sm: { span: 18 } }"
          >
            <a-date-picker v-decorator="['closureTime']"/>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="24">
          <a-form-item
            label="备注"
            :labelCol="{ lg: { span: 3 }, sm: { span: 3 } }"
            :wrapperCol="{ lg: { span: 21 }, sm: { span: 21 } }"
          >
            <a-col :span="24">
              <BaseTextarea placeholder="请输入" style="resize: none;" :rows="2" v-decorator="['partName']" />
            </a-col>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
  </base-modal>
</template>

<script>
import BaseModal from '@/components/BaseModal'
export default {
    name:'a'+Date.now(),  components: {
    BaseModal,
  },
  data() {
    return {
      treeExpandedKeys: [],
      value: undefined,
      pageType: 'add',
      formInfo: this.$form.createForm(this, { name: 'updateForm' }),
    }
  },
  methods: {
    handleOk() {},
  },
}
</script>


<style lang="less" scoped>
form .ant-mentions,
form textarea.ant-input {
  height: auto !important;
  width: 100%;
}
</style>